struct TreeNode* BuyNode(int x)
{
    struct TreeNode* newnode = (struct TreeNode*)malloc(sizeof(struct TreeNode));
    newnode->val = x;
    newnode->left = NULL;
    newnode->right = NULL;
    return newnode;
}

struct TreeNode* Merge(struct TreeNode* root1, struct TreeNode* root2)
{
    if (root1 == NULL && root2 == NULL)
    {
        return NULL;
    }
    struct TreeNode* newnode = BuyNode(0);
    if (root1)
        newnode->val += root1->val;
    if (root2)
        newnode->val += root2->val;
    if (root1 && root2)
    {
        newnode->left = Merge(root1->left, root2->left);
        newnode->right = Merge(root1->right, root2->right);
    }
    else if (root1)
    {
        newnode->left = Merge(root1->left, NULL);
        newnode->right = Merge(root1->right, NULL);
    }
    else
    {
        newnode->left = Merge(NULL, root2->left);
        newnode->right = Merge(NULL, root2->right);
    }
    return newnode;


}